<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>mpi.communicator.Communicator</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css"></link>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">

<!-- =========== START OF NAVBAR =========== -->
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="center">
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="http://www.penzilla.net/mmpi/docs/top.shtml">Home</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar" align="right" width="100%">
      <table border="0" cellpadding="0" cellspacing="0">
      <tr><th class="navbar" align="center">
        <p class="nomargin">
          <a class="navbar" target="_top" href="http://www.penzilla.net/mmpi/">Project&nbsp;Homepage</a>
      </p></th></tr></table>
    </th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <font size="-1"><b class="breadcrumbs">
        <a href="mpi-module.html">Package&nbsp;mpi</a> ::
        <a href="mpi.communicator-module.html">Module&nbsp;communicator</a> ::
        Class&nbsp;Communicator
      </b></font></br>
    </td>
    <td><table cellpadding="0" cellspacing="0">
      <tr><td align="right"><font size="-2">[show&nbsp;private&nbsp;|&nbsp;<a href="../public/mpi.communicator.Communicator-class.html">hide&nbsp;private</a>]</font></td></tr>
      <tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a>&nbsp;|&nbsp;<a href="mpi.communicator.Communicator-class.html" target="_top">no&nbsp;frames</a>]</font></td></tr>
    </table></td>
</tr></table>

<!-- =========== START OF CLASS DESCRIPTION =========== -->
<h2 class="class">Class Communicator</h2>

<dl><dt><b>Known Subclasses:</b></dt>
<dd>
    <a href="mpi.pympi.Communicator-class.html"><code>Communicator</code></a></dd></dl>

<hr/>

Communicator objects encapsulate integer communicator handles
<hr/>


<!-- =========== START OF METHOD SUMMARY =========== -->
<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="summary">
  <th colspan="2">Method Summary</th></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><a name="__init__"></a><span class="summary-sig"><span class="summary-sig-name">__init__</span>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>id</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><a name="__del__"></a><span class="summary-sig"><span class="summary-sig-name">__del__</span>(<span class=summary-sig-arg>self</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="mpi.communicator.Communicator-class.html#__getitem__" class="summary-sig-name"><code>__getitem__</code></a>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>key</span>)</span></code>
<br />
Implements a pyMPI style slicing cability for Communicators.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><a name="__int__"></a><span class="summary-sig"><span class="summary-sig-name">__int__</span>(<span class=summary-sig-arg>self</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><a name="__len__"></a><span class="summary-sig"><span class="summary-sig-name">__len__</span>(<span class=summary-sig-arg>self</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><a name="__repr__"></a><span class="summary-sig"><span class="summary-sig-name">__repr__</span>(<span class=summary-sig-arg>self</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><a name="__str__"></a><span class="summary-sig"><span class="summary-sig-name">__str__</span>(<span class=summary-sig-arg>self</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="mpi.communicator.Communicator-class.html#create" class="summary-sig-name"><code>create</code></a>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>processor_list</span>)</span></code>
<br />
new_comm = comm_create(comm, processor_list)</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="mpi.communicator.Communicator-class.html#dup" class="summary-sig-name"><code>dup</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
<br />
new_comm = old_comm.dup( )</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="mpi.communicator.Communicator-class.html#rank" class="summary-sig-name"><code>rank</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
<br />
rank = comm.rank()</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="mpi.communicator.Communicator-class.html#size" class="summary-sig-name"><code>size</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
<br />
size = comm.size()</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="mpi.communicator.Communicator-class.html#split" class="summary-sig-name"><code>split</code></a>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>color</span>,
          <span class=summary-sig-arg>key</span>)</span></code>
<br />
new_comm = comm_split( comm, color, key )

color:  all processors that call comm_split with the same color will be put
            into the same communicator.</td></tr>
</table><br />


<!-- =========== START OF METHOD DETAILS =========== -->
<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="details">
  <th colspan="2">Method Details</th></tr>
</table>

<a name="__getitem__"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <h3><span class="sig"><span class="sig-name">__getitem__</span>(<span class=sig-arg>self</span>,
          <span class=sig-arg>key</span>)</span>
    <br /><i>(Indexing operator)</i>
  </h3>
  Implements a pyMPI style slicing cability for Communicators.
  <dl><dt></dt><dd>
  </dd></dl>
</td></tr></table>

<a name="create"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <h3><span class="sig"><span class="sig-name">create</span>(<span class=sig-arg>self</span>,
          <span class=sig-arg>processor_list</span>)</span>
  </h3>
  <p>new_comm = comm_create(comm, processor_list)</p>
  processor_list: simple python list specifying all the processors to 
  put into the new communicator.
  <dl><dt></dt><dd>
  </dd></dl>
</td></tr></table>

<a name="dup"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <h3><span class="sig"><span class="sig-name">dup</span>(<span class=sig-arg>self</span>)</span>
  </h3>
  <p>new_comm = old_comm.dup( )</p>
  Simply makes a copy (dup-&gt;duplicate) of comm.
  <dl><dt></dt><dd>
  </dd></dl>
</td></tr></table>

<a name="rank"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <h3><span class="sig"><span class="sig-name">rank</span>(<span class=sig-arg>self</span>)</span>
  </h3>
  <p>rank = comm.rank()</p>
  Returns the rank (processor ID) of the calling processor.
  <dl><dt></dt><dd>
  </dd></dl>
</td></tr></table>

<a name="size"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <h3><span class="sig"><span class="sig-name">size</span>(<span class=sig-arg>self</span>)</span>
  </h3>
  <p>size = comm.size()</p>
  Returns the size of the communicator
  <dl><dt></dt><dd>
  </dd></dl>
</td></tr></table>

<a name="split"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <h3><span class="sig"><span class="sig-name">split</span>(<span class=sig-arg>self</span>,
          <span class=sig-arg>color</span>,
          <span class=sig-arg>key</span>=<span class=sig-default>0</span>)</span>
  </h3>
<pre class="literalblock">
new_comm = comm_split( comm, color, key )

color:  all processors that call comm_split with the same color will be put
            into the same communicator.
key:  determines the order of the processors in the new communicator
</pre>
  <dl><dt></dt><dd>
  </dd></dl>
</td></tr></table>
<br />


<!-- =========== START OF NAVBAR =========== -->
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="center">
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="http://www.penzilla.net/mmpi/docs/top.shtml">Home</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar" align="right" width="100%">
      <table border="0" cellpadding="0" cellspacing="0">
      <tr><th class="navbar" align="center">
        <p class="nomargin">
          <a class="navbar" target="_top" href="http://www.penzilla.net/mmpi/">Project&nbsp;Homepage</a>
      </p></th></tr></table>
    </th>
  </tr>
</table>

<table border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
    <td align="left"><font size="-2">Generated by Epydoc 2.1 on Wed Jun 14 14:30:58 2006</font></td>
    <td align="right"><a href="http://epydoc.sourceforge.net"
                      ><font size="-2">http://epydoc.sf.net</font></a></td>
  </tr>
</table>
</body>
</html>
